package TestSolidity;
import java.util.Scanner;

public class getInfor_Record {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] testArr = {2, 4, 1, 5, 3, 7, 6, 9, 0, 8};
        int test = sc.nextInt();
        for (int i = 0; i < testArr.length - 1; i++) {
            testArr[i] = testArr[i + 1];
        }
        testArr[testArr.length - 1] = test;
        for(int i : testArr){
            System.out.print(i + " ");
        }
    }
}
